<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Ticket extends MY_Controller {
    
    
    function __construct()
    {
        parent::__construct();
        $this->load->model('Account_model','Account');
        
    }
    public function index()
    {
        echo 'it works!';
    }
    public function validation()
    {

        $ticket = $this->input->get('ticket');
        if(!empty($ticket))
        {
            $this->load->library('memcachedhelper');
            $data =  $this->memcachedhelper->get($ticket);
            if($data)
            {
                $this->response['code'] = 0;
                $this->response['message'] = '';
                $this->response['data'] = $data;
                //$this->memcachedhelper->delete($ticket);
            }
            else
            {
                $this->setResponse('TOKEN_NOT_FOUND');
               
            }
        }
        else
        {
            $this->setResponse('TOKEN_IS_EMPTY');

        }
        $this->_print();
    }
}